trigger: none

# This pipeline currently has too many failures to be enabled by schedule.
# schedules:
# - cron: "0 10 * * 6"
#   displayName: Sat at 2:00 AM (UTC-8:00)
#   branches:
#     include:
#     - main
#   always: true

variables:
  - template: /eng/pipelines/common/variables.yml

extends:
  template:  /eng/pipelines/common/templates/pipeline-with-resources.yml
  parameters:
    stages:
    - stage: Build
      jobs:
extends:
  template:  /eng/pipelines/common/templates/pipeline-with-resources.yml
  parameters:
    stages:
    - stage: Build
      jobs:

      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/global-build-job.yml
          buildConfig: release
          helixQueueGroup: libraries
          helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
          platformGroup: gcstress
          jobParameters:
            # Default timeout is 150 minutes (2.5 hours), which is not enough for stress.
            timeoutInMinutes: 660
            buildArgs: -s clr+libs+libs.tests -rc Checked -c $(_BuildConfig) /p:ArchiveTests=true
            postBuildSteps:
              - template: /eng/pipelines/libraries/helix.yml
                parameters:
                  creator: dotnet-bot
                  extraHelixArguments: /maxcpucount:10
                  scenarios:
                    # Disable gcstress0x3 for now; it causes lots of test timeouts. Investigate this after
                    # gcstress0xc runs are clean. Tracking issue: https://github.com/dotnet/runtime/issues/38903.
                    # - gcstress0x3
                    - gcstress0xc
